//
//  ICFactory.m
//  Iching
//
//  Created by Leonardo Celati on 29/12/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "ICFactory.h"


@implementation ICFactory



Line randomLineGenerator() {
	short line=0;
	for (short i=0;i<3;i++) {
		line += (arc4random() %  100) % 2 +2;
	}
	return line;
}

Hexagram buildHexagram() {
	
	Hexagram sign;
	sign.start=randomLineGenerator();
	sign.officer=randomLineGenerator();
	sign.transit=randomLineGenerator();
	sign.minister=randomLineGenerator();
	sign.lord=randomLineGenerator();
	sign.end=randomLineGenerator();
	
	return sign;

}

void tossCoins() {
}

Line throwCoins() {	
	return randomLineGenerator();
}





- (void)dealloc {
    [super dealloc];
}


@end
